/*****************************************************************************
*
*  PROJECT:     Projekt-grupp6
*  FILE:        player.h
*  PURPOSE:     Header file for player.c
*  DEVELOPER(S):  Kuchar Moulod Nizhad <kuchar@kth.se>
*                 Alexey Kovalev       <alexeyk@kth.se>
*				  Fredrik Laason <laason@kth.se>
*
*****************************************************************************/

#ifndef PLAYER_H
#define PLAYER_H

#include "SDL.h"
#include "SDL_image.h"

#define SCREEN_WIDTH 1024
#define SCREEN_HEIGHT 768
#define GAME_SPRITE_WIDTH 175
#define GAME_SPRITE_HEIGHT 270

struct player {
	float hp;
	int x;
	int y;
	int state;
	int index;
	char key;
	int damagedone;
};

void gravity(int *y);
int jump(int *y);
int jumpanim();
int death();
void UpdateLocalPlayer(SDL_Surface* screen, SDL_Surface* bg);
Sint16 DrawPlayer(char *png, int x, int y, int rx, int ry, int rw, int rh, SDL_Surface* screen);
Sint16 move(int dir);
void duck(SDL_Surface* screen, SDL_Surface* bg);
void duckpunch(SDL_Surface* screen, SDL_Surface* bg);
void kick(SDL_Surface* screen, SDL_Surface* bg);;
void block();
void idle();
void punch(SDL_Surface* screen, SDL_Surface* bg);
void duckkick(SDL_Surface* screen, SDL_Surface* bg);
void updateHP(SDL_Surface* screen, int player, float hp);

#endif